package com.ssm.pre.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssm.pre.service.FaultInfoService;
import com.ssm.util.object.InputObject;
import com.ssm.util.object.OutputObject;

@Controller
public class FaultInfoController {
	
	@Autowired
	private FaultInfoService fInfoService;
	
	
	/**
	 * 查询故障詳情列表
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/FaultInfoController/queryFaultInfoList")
	@ResponseBody
	public void queryFaultInfoList(InputObject inputObject ,OutputObject outputObject) throws Exception{
		fInfoService.queryFaultInfoList(inputObject, outputObject);
	}
	
	/**
	 * 增加故障详情
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/FaultInfoControllerr/addFaultInfo")
	@ResponseBody
	public void addFaultInfo(InputObject inputObject ,OutputObject outputObject) throws Exception{
		fInfoService.addFaultInfo(inputObject, outputObject);
		
	}
	
	
	/**
	 * 刪除故障详情
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/FaultInfoControllerr/deleteFaultInfoById")
	@ResponseBody
	public void deleteFaultInfoById(InputObject inputObject ,OutputObject outputObject) throws Exception{
		fInfoService.deleteFaultInfoById(inputObject, outputObject);
		
		
	}
	/**
	 * 修改故障详情
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/FaultInfoControllerr/updateFaultInfo")
	@ResponseBody
	public void updateFaultInfo(InputObject inputObject ,OutputObject outputObject) throws Exception{
		fInfoService.editFaultInfo(inputObject, outputObject);
		
		
	}
	
	/**
	 * 查询一条故障详情
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/FaultInfoControllerr/findFaultInfoById")
	@ResponseBody
	public void findFaultInfoById(InputObject inputObject ,OutputObject outputObject) throws Exception{
		fInfoService.findFaultInfoById(inputObject, outputObject);
		
		
	}

}
